import { useState, useEffect } from "react";
import { Modal } from "antd";

export default function BaseModal(props) {
  const [isOpen, setIsOpen] = useState(false);

  useEffect(() => {
    setIsOpen(props.vis);
  }, [props.vis])

  const okTrigger = () => {
    props.showModal(false);
  }

  const cancelTrigger = () => {
    props.showModal(false);
  }

  return (
    <Modal
      title="提示"
      open={isOpen}
      onOk={okTrigger}
      onCancel={cancelTrigger}
    >
      <p>111</p>
      <p>111</p>
      <p>111</p>
      <p>111</p>
      <p>111</p>
    </Modal>
  )
}
